/**
 * Created by x298017064010 on 17/3/21.
 */

import Router from 'vue-router'
import Root from '../views/root.vue'
import Demo from '../views/demo.vue'
import Todo from '../views/todo.vue'
import Welcome from '../views/welcome.vue'

import Animation from '../demos/demoAnimation.vue'
import Dom from '../demos/demoDom.vue'
import Picker from '../demos/demoPicker.vue'
import Clipboard from '../demos/demoClipboard.vue'
import Stream from '../demos/demoStream.vue'
import Webview from '../demos/demoWebview.vue'

import Recommend from '../views/recommend.vue'
import Allplay from '../views/allplay.vue'
import Mine from '../views/mine.vue'

Vue.use(Router);

export default new Router({
    // mode: 'abstract',    // 不需要设置模式, 系统自动匹配
    routes: [
        { path: '/root', component: Root },
        { path: '/demo', component: Demo },
        { path: '/todo', component: Todo },
        { path: '/animation', component: Animation },
        { path: '/dom', component: Dom },
        { path: '/picker', component: Picker },
        { path: '/clipboard', component: Clipboard },
        { path: '/stream', component: Stream },
        { path: '/webview', component: Webview },
        { path: '/welcome', component: Welcome },

        // 项目相关
        { path: '/recommend', component: Recommend },
        { path: '/allplay', component: Allplay },
        { path: '/mine', component: Mine },


        // { path: '/article/:url(.*)?', component: ArticleView },
        // { path: '/item/:id(\\d+)', component: CommentView },
        // { path: '/user/:id', component: UserView },
        { path: '/', redirect: '/root' }
    ]
})